﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Homework5._2成绩判定
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("请输入学生分数：");
            Double.TryParse(Console.ReadLine(), out Double Score);
            while (Score < 0 || Score > 100)
            {
                Console.Write("输入错误，请重新输入学生分数：");
                Double.TryParse(Console.ReadLine(), out Score);
            }
            int num = (int)(Score / 10);
            switch (num)
            {
                case 10:
                    Console.WriteLine("成绩优秀");
                    break;
                case 9:
                    Console.WriteLine("成绩优秀");
                    break;
                case 8:
                    Console.WriteLine("成绩良好");
                    break;
                case 7:
                    Console.WriteLine("成绩合格");
                    break;
                case 6:
                    Console.WriteLine("成绩合格");
                    break;
                default:
                    Console.WriteLine("成绩不合格");
                    break;
            }
            Console.ReadKey();
        }
    }
}
